package com.hzhq.contract.service;

import com.hzhq.contract.bean.dto.ContractDTO;
import com.hzhq.contract.bean.entity.Contract;
import com.hzhq.contract.bean.vo.ContractVO;
import org.bson.types.ObjectId;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * @author: hzhq1255
 * @mail: hzhq1255@163.com
 * @date: 2021/4/14 19:27
 * @desc:
 */
public interface ContractService {

    
    ContractDTO getOneById(String id);
    
    ContractDTO getOneByName(String name);
    
    Page<ContractDTO> getAllPage(Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByUserDepart(String username, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByDepart(String departName, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByType(String typeName, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByPassed(Integer passed, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByEdited(Integer edited, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByCreateUser(String createUser, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> getAllPageByApprovalPerson(String approvalPerson, Integer currentPage, Integer pageSize);
    
    Page<ContractDTO> searchByName(String contractName,Integer currentPage, Integer pageSize);


    Page<ContractDTO> getAllPage(ContractDTO contractDTO, Integer currentPage,Integer pageSize);


    ContractDTO save(ContractDTO contractDTO);


    String deleteById(ObjectId id);

    List<String> deleteByIds(List<ObjectId> ids);
    


}
